home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / daemons / ipServer / socket.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-08-16  |  2.2 KB  |  86 lines

  1. /*
  2.  * socket.h --
  3.  *
  4.  *    External declarations of the socket-related routines.
  5.  *
  6.  * Copyright 1987 Regents of the University of California
  7.  * All rights reserved.
  8.  * Permission to use, copy, modify, and distribute this
  9.  * software and its documentation for any purpose and without
  10.  * fee is hereby granted, provided that the above copyright
  11.  * notice appear in all copies.  The University of California
  12.  * makes no representations about the suitability of this
  13.  * software for any purpose.  It is provided "as is" without
  14.  * express or implied warranty.
  15.  *
  16.  *
  17.  * $Header: /sprite/src/daemons/ipServer/RCS/socket.h,v 1.3 89/08/15 19:55:41 rab Exp $ SPRITE (Berkeley)
  18.  */
  19.  
  20. #ifndef _IPS_SOCKET
  21. #define _IPS_SOCKET
  22.  
  23. #include "sprite.h"
  24. #include "dev/net.h"
  25.  
  26. #include "sockInt.h"
  27.  
  28. /* constants */
  29.  
  30. /* data structures */
  31.  
  32. typedef struct Sock_SharedInfo *Sock_InfoPtr;
  33.  
  34. /* procedures */
  35.  
  36. extern void        Sock_Init();
  37. extern ReturnStatus    Sock_Open();
  38. extern ReturnStatus    Sock_Close();
  39. extern ReturnStatus    Sock_Read();
  40. extern ReturnStatus    Sock_Write();
  41. extern ReturnStatus    Sock_IOControl();
  42. extern int        Sock_Select();
  43. extern void        Sock_ReturnError();
  44. extern void        Sock_SetError();
  45. extern Sock_InfoPtr    Sock_Match();
  46. extern Sock_InfoPtr    Sock_Clone();
  47. extern void        Sock_Destroy();
  48. extern void        Sock_NotifyWaiter();
  49. extern void        Sock_HaveUrgentData();
  50. extern void        Sock_Connected();
  51. extern void        Sock_Disconnected();
  52. extern void        Sock_Disconnecting();
  53. extern Boolean        Sock_IsOptionSet();
  54. extern Boolean        Sock_HasUsers();
  55. extern Boolean        Sock_IsRecvStopped();
  56. extern Boolean        Sock_IsSendStopped();
  57. extern void        Sock_UrgentDataNext();
  58. extern void        Sock_StopRecv();
  59. extern void        Sock_StopSending();
  60. extern Sock_InfoPtr    Sock_ScanList();
  61. extern void        Sock_BadRoute();
  62. extern int        Sock_PrintInfo();
  63.  
  64. extern int        Sock_BufSize();
  65. extern void        Sock_BufRemove();
  66. extern ReturnStatus    Sock_BufAppend();
  67. extern void        Sock_BufCopy();
  68. extern void        Sock_BufAlloc();
  69. extern ReturnStatus    Sock_BufFetch();
  70.  
  71. typedef enum{
  72.     SOCK_RECV_BUF,
  73.     SOCK_SEND_BUF,
  74. } Sock_BufType;
  75.  
  76. typedef enum {
  77.     SOCK_BUF_USED,
  78.     SOCK_BUF_FREE,
  79.     SOCK_BUF_MAX_SIZE,
  80. } Sock_BufRequest;
  81.  
  82. #define SOCK_BUF_PEEK    NET_PEEK
  83. #define SOCK_BUF_STREAM    0x80000000
  84.  
  85. #endif /* _IPS_SOCKET */
  86.